import 'package:happy_elf_app/utils/request.dart';

class User {
  Map user = {
    'login': '/app/login', // 登录
    'userInfo': '/app/profile', // 获取用户信息
    'report': '/app/page-event/report', // 上报时间
  };

  Request request = Request();

  Future<dynamic> login({data}) async {
    var res =
        await request.http(method: 'POST', api: user['login'], data: data);
    return res;
  }

  Future<dynamic> getUserInfo() async {
    var res = await request.http(method: 'GET', api: user['userInfo']);
    return res;
  }

  Future<dynamic> report(data) async {
    var res =
        await request.http(method: 'POST', api: user['report'], data: data);
    return res;
  }
}
